-
Notifications
You must be signed in to change notification settings - Fork 8.2k
drivers: UC81xx partial refresh profiles #48383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a45b065 to
af19999
Compare
boards/shields/waveshare_epaper/waveshare_epaper_gdew042t2-p.overlay
Outdated
Show resolved
Hide resolved
boards/shields/waveshare_epaper/waveshare_epaper_gdew042t2-p.overlay
Outdated
Show resolved
Hide resolved
|
@jfischer-no Any thoughts on how a missing partial refresh profile should be treated? Is the current approach acceptable? Or should I just use the settings from the full refresh profile (if present) and just scan the partial window? |
Tested, I do not see any regressions.
+1 for "Use the settings from the full refresh profile, but only scan the refresh window. This is similar to the old behaviour." |
The UC81xx driver prints a debug message on every iteration of its busy wait loop. This makes debug output almost useless. Modify this code to print a debug message on entry and exit instead. Signed-off-by: Andreas Sandberg <[email protected]>
Some commands need to signal that the chip is busy using the busy pin. We generally need to wait for the chip to exit the busy state before issuing a new command. Call uc81xx_busy_wait() from uc81xx_write_cmd() just before issuing a new command instead to avoid sprinkling wait calls everywhere. Signed-off-by: Andreas Sandberg <[email protected]>
Introduce the concept of refresh profiles which are specified as a child node in the device tree. This makes it possible to use different overrides for different types of refreshes (full/partial). The only profile that is currently supported is the "full" profile. Signed-off-by: Andreas Sandberg <[email protected]>
Add a separate profile for partial refreshes. This makes it possible to specify a separate refresh configuration for partial and full refreshes. The driver now transitions to full refresh mode when blanking is turned on. It transitions back to partial refresh mode when there is a write while blanking is off. Signed-off-by: Andreas Sandberg <[email protected]>
Add support for overriding display LUTs in the UC81xx driver. This makes it possible to use different LUTs for the full and partial refresh profiles. Signed-off-by: Andreas Sandberg <[email protected]>
Some custom refresh profiles need to set the PLL and VDCS registers. Add them as optional DT properties. Signed-off-by: Andreas Sandberg <[email protected]>
The UC8176 doesn't automatically copy writes to the buffer containing the old SRAM contents. In this case, we need to manually copy data to the back buffer. Signed-off-by: Andreas Sandberg <[email protected]>
Add GoodDisplay GDEW042T2 with fast partial refresh. Based on configuration from GoodDisplay's Arduino example. Signed-off-by: Andreas Sandberg <[email protected]>
galak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove label prop
boards/shields/waveshare_epaper/waveshare_epaper_gdew042t2-p.overlay
Outdated
Show resolved
Hide resolved
af19999 to
b760948
Compare
Overview
All UC81xx devices support partial refresh by only scanning a subset (window) of the display. However, there is currently no way to specify different configuration overrides for different refresh types (full/partial). Having this capability makes it possible to implement fast (differential) partial refresh if the vendor provides suitable LUTs. This pull request addresses that by introducing different refresh profiles in the device tree.
It consists of the following major changes:
Add support for separate refresh profiles
Add support for separate partial and full refresh profiles. This makes it possible to specify different parameters for full and partial refreshes. The design is similar to the proposed design for the SSD16XX (#48163). However, unlike the SSD16xx, the driver always supports partial refresh even if a partial refresh profile hasn't been provided. This seems like the best option for this chip as it always supports scanning of a subset of the display.
Devices that need custom LUTs and voltages can specify them separately for the full and partial profiles. The controller will be reset when changing profiles which means that profiles always override the default reset values. This means that it is, for example, possible to use default values and LUTs from OTP for a full refresh and a custom profile for partial refreshes.
Differences between UC8176 and UC8179
UC8176 and UC8179 seem to handle frame buffers differently. According to the specification, UC8179 is capable of automatically copying from the current frame buffer to the old frame buffer. This is usually not a problem for most full refresh profiles since they tend to not perform differential refresh. However, when performing a fast differential refresh, it's necessary to maintain both frame buffers correctly. The UC8176 requires manual updates of the old frame buffer. This is enabled if the
auto_copyquirk is set tofalse.Testing
This has so far only been tested on a GDEW042T2. I don't own any boards using any other UltraChip controllers, so I would really appreciate it if someone with access to a GDEW075T7 could test this driver.
Open questions
Partial refresh specification in device tree
The current version of the patch assumes that a device that doesn't have a partial refresh node implements partial refresh with using the default configuration (the reset values) in the controller. This is different from the model in SSD16XX.
There are roughly possible approaches when no refresh profile has been specified in the device tree:
I'm leaning towards updating the PR to use option 3 instead of option 2. Option 1 seems like a poor fit for this controller since it always supports a partial display refresh.